﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace MapControl
{
    public class InfoBox : UserControl
    {
        public override string Text
        {
            get
            {
                return label1.Text;
            }
            set
            {
                label1.Text = value;
            }
        }

        //protected override void OnPaint(PaintEventArgs e)
        //{
        //    //base.OnPaint(e);
        //    IntPtr hdc = e.Graphics.GetHdc();
        //    using (GraphicsPlus g = new GraphicsPlus(hdc))
        //    {
        //        GraphicsPath path = RoundedRectangle.Create(5, 5, 20, 20);
        //        g.DrawPath(new PenPlus(System.Drawing.Color.Black, 1), path);
        //    }
        //    e.Graphics.ReleaseHdc(hdc);
        //    e.Graphics.DrawString(Text, new System.Drawing.Font("Tahoma", 8, System.Drawing.FontStyle.Regular), new SolidBrush(Color.Black), new RectangleF(0, 0, Width, Height));
        //}
        private Label label1;

        public InfoBox()
        {
            InitializeComponent();
        }

        private void InitializeComponent()
        {
            this.label1 = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // label1
            // 
            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.label1.Location = new System.Drawing.Point(3, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(135, 33);
            this.label1.Text = "label1";
            // 
            // InfoBox
            // 
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
            this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.Controls.Add(this.label1);
            this.Name = "InfoBox";
            this.Size = new System.Drawing.Size(141, 50);
            this.ResumeLayout(false);

        }
    }
}
